/**
 * 跨标签通信
 */
import React, { useState, useEffect } from 'react';
import styles from './index.less';
import { sendMsg, listenMsg } from './localEvent';

export default class extends React.Component {
  componentDidMount = () => {
    listenMsg((type, payload) => {
      console.log('来消息了');
      console.log(payload);
    });
  };
  render() {
    return <div>测试消息</div>;
  }
}
